package com.itheima.d2_recursion;

public class RecursionTest4 {
    public static void main(String[] args) {
    //猴子吃桃问题
        System.out.println(f(1));

    }
    public static int f(int n){
        if(n==10){
            return 1;
        }else {
            return 2*f(n+1)+2;
        }
    }
}
